Skip to content

Conversation

jackh726
Copy link
Member

@jackh726 jackh726 commented Dec 13, 2021

Fixes #91036
Fixes #90888
Fixes #91348 (better error + documentation to be added to linked issue)

Instead of checking for bounds directly, try to prove them in the associated type environment.

Also, add a bit of extra information to the error, including a link to the relevant discussion issue (#87479). That should be edited to include a brief summary of the current state of the outlives lint, including a brief background. It also might or might not be worth it to bump this to a full error code at some point.

r? @nikomatsakis

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Dec 13, 2021
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 13, 2021
@rust-log-analyzer

This comment has been minimized.

@jackh726 jackh726 force-pushed the gats-outlives-lint-part2 branch from ef723b7 to 8be1695 Compare December 13, 2021 05:48
Comment on lines +610 to +611
// `region_a: region_b` -> `region_b <= region_a`
(&infcx).push_sub_region_constraint(origin, region_b, region_a);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is separate from the above logic; bug fix for #91036

@jackh726 jackh726 force-pushed the gats-outlives-lint-part2 branch from 8be1695 to 8a28c17 Compare December 13, 2021 05:50
@nikomatsakis
Copy link
Contributor

r=me with the above changes

@jackh726
Copy link
Member Author

@bors r=nikomatsakis

@bors
Copy link
Collaborator

bors commented Dec 13, 2021

📌 Commit 4897415 has been approved by nikomatsakis

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 13, 2021
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 13, 2021
…r=nikomatsakis

GATs outlives lint: Try to prove bounds

Fixes rust-lang#91036
Fixes rust-lang#90888
Fixes rust-lang#91348 (better error + documentation to be added to linked issue)

Instead of checking for bounds directly, try to prove them in the associated type environment.

Also, add a bit of extra information to the error, including a link to the relevant discussion issue (rust-lang#87479). That should be edited to include a brief summary of the current state of the outlives lint, including a brief background. It also might or might not be worth it to bump this to a full error code at some point.

r? `@nikomatsakis`
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 13, 2021
…askrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#91699 (Add `-webkit-appearance: none` to search input)
 - rust-lang#91846 (rustdoc: Reduce number of arguments for `run_test` a bit)
 - rust-lang#91847 (Fix FIXME for `generic_arg_infer` in `create_substs_for_ast_path`)
 - rust-lang#91849 (GATs outlives lint: Try to prove bounds)
 - rust-lang#91855 (Stabilize const_cstr_unchecked)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 8487833 into rust-lang:master Dec 13, 2021
@rustbot rustbot added this to the 1.59.0 milestone Dec 13, 2021
@jackh726 jackh726 deleted the gats-outlives-lint-part2 branch December 14, 2021 01:42
@jackh726 jackh726 restored the gats-outlives-lint-part2 branch March 12, 2022 18:30
@jackh726 jackh726 deleted the gats-outlives-lint-part2 branch March 12, 2022 18:34
@jackh726 jackh726 restored the gats-outlives-lint-part2 branch March 12, 2022 18:42
@jackh726 jackh726 deleted the gats-outlives-lint-part2 branch March 12, 2022 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
6 participants